package com.example.practice.service;

import com.example.practice.entity.Activity;
import com.example.practice.entity.Rule;
import com.example.practice.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * (Activity)表服务接口
 *
 * @author makejava
 * @since 2023-12-21 10:00:20
 */
public interface ActivityService {


    /**
     * 获取已经参加的活动
     * @param uid
     * @return
     */
    List<Activity> getJoinActivity(Integer uid);

    /**
     * 获取没有参加的活动
     * @param uid
     * @return
     */
    List<Activity> getNotJoinActivity(Integer uid);

    /**
     * 获取自己发布的活动
     * @param uid
     * @return
     */
    List<Activity> getReleaseActivity(Integer uid);

    Integer queryCheckStatus(Integer uid, Integer aid);

    /**
     * 创建活动
     * @param uid
     * @param activity
     * @return
     */
    Integer createActivity(Integer uid, Activity activity);


    Integer updateActivity(Activity activity);

    Integer studentJoin(Integer uid,Integer aid);

    String activityRelease(Rule rule,Integer sid);

    Boolean queryIfJoin(Integer uid, Integer aid);

    Boolean queryIfRelease(Integer aid);

    Integer ExitActivity(Integer uid, Integer aid);

    Activity getDetail(Integer aid);

    String updateActivityStatus(Integer aid);

    String updateActivityStatus1(Integer aid);

    Integer deleteActivity(Integer aid);

    Integer addNum(Integer aid);
    Integer subNum(Integer aid);
    Activity queryByaid(Integer aid, Integer uid);

    Activity queryByName(String name, Integer uid);

    List<Activity> getAllByUid(Integer uid);

    Activity getAct(Integer fid);

    List<Activity> getAllAct();
    Activity queryIdByName(String name);

    String updateActivityStatus2(Integer aid);


    Activity getActivityById(Integer id);

    List<Activity> getActivityByUid(Integer uid);

    List<Activity> getDistName();

    String getByAid(Integer aid);
    Integer insertActivityAndSchool(Integer uid, List<String> sName, Integer aid);

    Rule getActRuleByAid(Integer aid);

    List<User> getUserNum(Integer aid);

    List<Activity> getAllActivity();
}
